<footer>
    <p>&copy; 2012</p>
</footer>
<?php
if (isset($_GET['error_reason']) && $_GET['error_reason'] == 'user_denied') {
    ?>
    <script>
        $(document).ready(function(){
            $('#permission-modal').modal({
                keyboard: true,
                backdrop: true,
                show: true
            })
        });
    </script>
    <div id = "permission-modal" class = "modal hide fade" style = "display: none; ">
        <div class = "modal-header">
            <a href = "#" class = "close">×</a>
            <h2>Hey there! <small>permission request</small></h2>
        </div>
        <div class = "modal-body">
            <img class="pull-left" src="img/reindeer_icon.png" style="margin: -20px 0px;margin-right: 30px;"/>
            <p>
                We need your permission to help find best gifts. Please go back and click blue button "Go to App".
            </p>
            <div class="clear"></div>
        </div>
        <div class = "modal-footer">
            <a href = "#" class = "btn primary auth">Permission request</a>
        </div>
    </div>
    <?php
}
?>

<?php
if (defined('DEBUG')):
    ?>
    <pre>
        <?php
        var_dump($_GET);
        var_dump($_POST);

        var_dump(parse_signed_request($_POST['signed_request']));
        ?>
    </pre>
    <?php
endif;
?> 

</div>

</body>
</html>
